package com.lost.octopus.es.helper.util;

import org.springframework.util.StringUtils;

import java.util.Objects;

import lombok.AccessLevel;
import lombok.NoArgsConstructor;

/**
 * 字符串工具
 * @author zhangbh
 **/
@NoArgsConstructor(access = AccessLevel.PRIVATE)
public class StringUtil {

    /**
     * 判断为空
     * @param obj 对象
     * @return 是否为空
     */
    public static boolean isBlank(Object obj) {
        return Objects.isNull(obj) || !StringUtils.hasText(obj.toString());
    }
}
